1. Field of the Invention
The present invention relates to digital communication, and in particular, to a technology for guaranteeing data communicated.
2. Description of the Related Art
Conventional video and audio apparatuses include input and output terminals for analog signals such that video and audio signals communicated between such apparatuses are represented in an analog format.
Recently, digital communication is coming to wide use in place of the analog communication. In this field, IEEE1394 has been known as a representative standard for the digital communication.
FIG. 16 shows an example of an isochronous communication stipulated by IEEE1394.
The isochronous communication is synchronous communication in which one packet is transferred for each cycle of time T (=125 microseconds (.mu.s)). During the cycle, a cycle start packet SP is supplied to a bus and then a data packet including a packet header PH and a data field DT is fed thereto in a successive fashion.
The cycle start packet SP includes a signal to enable communication to be started and is supplied to the bus from a root node of a communication network including a common bus to which a plurality of nodes are connected. Detecting an event that the cycle start packet SP is supplied to the bus, each node feeds a data packet including a packet header PH and a data field DT to the bus without specifying its communication partner. Stored in the packet header PH are information items such as a data length of data field DT. In the data field DT, there is stored data as an object of communication, e.g., a video signal.
In the isochronous communication, a predetermined bandwidth is reserved at an interval of time T and hence data can be communicated in a realtime fashion. When the cycle start packet SP is detected by a node on the transmission side, the node delivers a data packet to the bus in a broadcast manner without designating the destination of communication. Nodes on the reception side acquires, when necessary, the data packet supplied to the bus. The transmitting node only sends the data packet, i.e., cannot recognize whether or not the data packet has been normally received by nodes on the reception side.
The isochronous communication is a kind of synchronous communication in which the normality of data communicated is not basically guaranteed. Data transmitted from a node on the transmission side is equivalent to a broadcast message, namely, there is not achieved any handshake by the transmitting node. Therefore, the transmitting node cannot confirm whether or not the communication partner has normally received the data.
However, for example, when compressed video data is to be communicated, a missing data item or a data item changed may possibly cause a fatal damage to the quality of data and hence there is desired means for guaranteeing the normality of communicated data. In the isochronous communication, since it is impossible to recognize occurrence of communication errors, the normality of data cannot be guaranteed.
Subsequently, description will be given of a method of specifying a data length of the data field DT. According to the IEEE1394 standard, the maximum length of transmission data is required to be designated in advance. Assume that the maximum length is set as ten bytes.
In FIG. 17A, after a cycle start packet SP is sent at time t1, there is transmitted a data packet including a packet header PH in which information indicating the maximum data length (ten bytes) is stored in its data length field and a data field DT of the maximum data length (ten bytes). The data to be transmitted is once accumulated in a buffer before the transmission thereof such that the first ten-byte data (of the maximum length) is stored in the data field DT for transmission.
Similarly, after a cycle start packet SP is sent at time t2, there is transmitted a data packet including a packet header PH in which information indicating the maximum data length (ten bytes) is stored in its data length field and a data field DT in which the first ten-byte data (of the maximum length) obtained from the transmission data remaining in the buffer is stored. This also applies to the operation after transmission of a cycle start packet SP at time t3.
FIG. 17B shows a case in which the data length indicated by the packet header PH varies from that of the data field DT.
After each of the cycle start packets SP sent at points of time t1 and t3, the data length indicated by the packet header PH is equal to that of the data field DT. However, after the transmission of cycle start packet SP at time t2, the data length contained in the packet header PH indicates the maximum data length (ten bytes) and the data length of data field DT is nine bytes. Namely, these data lengths are different from each other. This takes place for the following reasons.
In accordance with the IEEE1394 standard, the communication interface facility automatically generates a packet header PH indicating the maximum data length (ten bytes) in the data length field. After the creation of packet header PH, data items may be sequentially accumulated in the buffer depending on cases. Consequently, assuming that there is accumulated in the buffer a data item having a length equal to at least ten bytes (maximum data length), the interface facility produces the packet header PH indicating the maximum data length (ten bytes). However, in practice, there possibly occurs a case in which only a nine-byte data item is accumulated in the buffer. In this situation, although the data length field of packet header PH specifies the maximum data length (ten bytes), it is only possible to transmit nine-byte data item. This causes mismatching in data length.
When the data is transmitted regardless of the state of mismatching, the reception side of the pertinent data detects a communication error. As a result, the normal communication cannot be guaranteed in this case. To overcome this difficulty, the communication is carried out, for example, as follows.
FIG. 17C shows another example of data communication.
After a cycle start packet SP is sent at time t1, when data having a length equal to or more than the maximum data length (ten bytes) is accumulated in the buffer, there is transmitted a data packet including a packet header PH having a data length field indicating the maximum data length (ten bytes) and a data field DT in which the first ten-byte data item (of the maximum length) obtained from the data remaining in the buffer is stored.
After transmission of a cycle start packet SP at time t2, when the data accumulated in the buffer is less than the maximum data length (ten bytes), transmission of data is not conducted. Namely, the data is kept remained in the buffer.
After transmission of a cycle start packet SP at time t3, when data having a length equal to or more than the maximum data length (ten bytes) is accumulated in the buffer, there is transmitted a data packet including a packet header PH having a data length field indicating the maximum data length (ten bytes) and a data field DT containing the first ten-byte data item (of the maximum length) obtained from the data remaining in the buffer.
According to the communication described above, since the data length denoted by the packet header PH is equal to that of data stored in the data field DT, the normal communication can be carried out. However, the data the length of which is less than the maximum data length (ten bytes), which is inherently required to be sent immediately after time t2, is transmitted only after time t3. This therefore becomes a characteristic defect in association with the realtime communication.
In accordance with the IEEE1394 standard, when the maximum data length is determined in advance, the maximum data length is automatically stored in the data length field of the packet header PH. However, When the data accumulated in the buffer has a length less than the maximum data length, the data length written in the packet header PH is unequal to that of data stored in the data field DT. When the transmission of data is forcibly conducted in this case, the normal communication cannot be guaranteed.
Additionally, when the data transmission is effected only after the data length of data accumulated in the buffer becomes equal to or more than the maximum data length, there appears the defect deteriorating the realtime characteristic of the communication.